<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common.jspf"%>  
<link rel="stylesheet" href="/jeons/css/default.css" type="text/css" media="screen" />
<script type="text/javascript">
	$(document).ready(function(){
		
		//상품명 글쓰기
		$("#BtnInsertData_review").click( function(){
			$.get('/jeons/review/insert',function(data){
				$("#subpage_review").replaceWith(data);
			});
		});
		
		//읽기
		$("[name=readView_tmp]").click( function(){
			$.get('/jeons/review/view?reno='+$(this).attr('reno'),function(data){
				$("#subpage_review").replaceWith(data);
			}); 		
		});
		
		//이메일
		/* $("#BtnEamil").click(function(){
			$.get('/jeons/email/send', function(data){
				alert('하하하하하하하ㅏ');
			});
		}); */
});
</script>
<div id="default">
<div id="subpage_review">
<table  border="0" width="675px">
		<tr>
			<td colspan="5" bgcolor="#000000" height="1"></td>
		</tr>
		<tr>
			<th align="center">번호</th>
			<th align="center" width="400px">제목</th>
			<th align="center">아이디</th>
			<th align="center">점수</th>
			<th align="center">작성일</th>
		</tr>
		<tr>
			<td colspan="5" bgcolor="#ffffff" height="1"></td>
		</tr>
		<c:forEach items="${reviewDTO}" var="item" varStatus="status">
		<tr>
			<td align="center">${count - (item.page-1)*10 - status.index}</td>
			<td name="readView_tmp"  reno="${item.reno}" align="center">${item.title}</td>	
			<td  align="center">${item.u_id}</td>	
			<td  align="center">
			<c:if test="${item.score == 'one'}">
			<font color="red">★</font>
			</c:if>
			<c:if test="${item.score == 'two'}">
			<font color="red">★★</font>
			</c:if>
			<c:if test="${item.score == 'three'}">
			<font color="red">★★★</font>
			</c:if>
			<c:if test="${item.score == 'four'}">
			<font color="red">★★★★</font>
			</c:if>
			<c:if test="${item.score == 'five'}">
			<font color="red">★★★★★</font>
			</c:if>
			<c:if test="${item.score == null}">
			입력되지않음
			</c:if>
			</td>	
			<td align="center"><fmt:formatDate value="${item.regdt}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
		</tr>
		</c:forEach>
		<tr>
			<td colspan="5" bgcolor="#ffffff" height="1"></td>
		</tr>
		<tr>
			<td colspan="5" bgcolor="#ffffff" height="1"></td>
		</tr>
	</table>
<div align="center">
	${pagereview}
</div>
<div align="right">
	<button type="button" id="BtnInsertData_review">글쓰기</button>
</div>	 
</div>
</div>